const fs = require('node:fs')
const readStream = fs.createReadStream('./1.txt', 'utf-8',)
const writeStream = fs.createWriteStream('./2.txt', 'utf-8')
readStream.pipe(writeStream)
// 高性能读写 copy 文件





pipeline(readStream, writeStream, (error) => {
  console.log('出错了')
  throw error
})